﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Forms;

namespace Minecraft.ModInstaller
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] Args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (!File.Exists("Minecraft.ContentInstaller.dll") || !File.Exists("ICSharpCode.SharpZipLib.dll"))
            {
                MessageBox.Show("One or more files are missing from your installation.\n\n" +
                    "Please ensure you extract all of the program's files to the same place.\n\n" + 
                    "If you need to download a new copy of the program, try http://minecraft.codeplex.com/.",
                    "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (Args.Length == 0)
                Application.Run(new MainWindow());
            else
                Application.Run(new MainWindow(Args));
        }
    }
}
